package com.wondertek.poms.pre.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.wondertek.poms.common.constant.Constants;
import com.wondertek.poms.pre.manager.imageback.RulePassProcess;

import lombok.extern.slf4j.Slf4j;

@Component
@Slf4j
@RabbitListener(queues = Constants.QUEUE_TRANS_IMG_BACK) // 监听队列
public class TransImgListener {

    @Autowired
    private RulePassProcess process;

    @RabbitHandler
    public void receiveContentTopic(String message) {
        log.info("内容同步主流程前置流程：接收转图消息|mq消息：" + message);
        process.process(message);
    }
}
